#include<stdio.h>

int main(void)
{
	double n,s;
	scanf("%lf",&n);
	if(n<=1000)
		s=n*0.95;
	else
		s=1000*0.95+(n-1000)*0.9;
	printf("%.2lf\n",s);
	return 0;
}
